<% content_for :head do %>
  <% if @topic.inactive? %>
    <meta name="robots" content="noindex">
  <% end %>
<% end %>

<div id="session-details" class="session-list content-section">
  <h2>Upcoming Sessions
    <%= link_to( 
        "Subscribe to the XML feed for this topic",
         topic_path(@topic, :format => :atom),
         :class => 'feed-link') %>
  </h2>
  <% if @topic.upcoming_sessions.present? %>
    <%= session_list(@topic.upcoming_sessions) %>
  <% else %>
    There are no sessions scheduled at this time.
  <% end %>
</div>

<%= render partial: "topics/details", 
            locals: {topic: @topic} %>

<div id="past-session-details" class="session-list content-section">
<% if authorized?(@topic) && @topic.past_sessions.present? %>
  <h2>Past Sessions</h2>
  <%= session_list(@topic.past_sessions.reverse) %>
<% end %>
</div>
